// i.d(t, {
//   vG: () => r,
//   FG: () => o,
//   hl: () => a,
//   to: () => l,
//   Q9: () => c,
//   w2: () => h,
//   qb: () => d,
//   Fs: () => u,
//   e3: () => p,
//   tf: () => m,
//   aB: () => g
// })

import CurveMath from "../utils/CurveMath"

const r = function (e, t, i, n) {
    return (i * e) / n + t
  },
  o = function (e, t, i, n) {
    return i * (e /= n) * e + t
  },
  a = function (e, t, i, n) {
    return -i * (e /= n) * (e - 2) + t
  },
  l = (e, t, i, n) => {
    return (e /= n / 2) < 1 ? (i / 2) * e * e + t : (-i / 2) * (--e * (e - 2) - 1) + t
  },
  c = function (e, t, i, n) {
    return i * (e /= n) * e * e + t
  },
  h = function (e, t, i, n) {
    return (e /= n), i * (--e * e * e + 1) + t
  },
  d = function (e, t, i, n) {
    return (e /= n / 2) < 1 ? (i / 2) * e * e * e + t : (i / 2) * ((e -= 2) * e * e + 2) + t
  },
  u = function (e, t, i, n) {
    return (-i / 2) * (Math.cos((Math.PI * e) / n) - 1) + t
  },
  p = (e, t, i, n, s) => {
    let r = t
    if (s > 0) {
      const t = (1 - Math.max(s, 0)) * Math.abs(n)
      r = i <= t ? 0 : e(i - t, 0, 1, t)
    }
    return r
  }
function m(e, t, i, n) {
  const r = new CurveMath(e, t, i, n)
  return (e: number, t: number, i: number, n: number) => {
    const s = e / n
    return t + i * r.solve(s)
  }
}
const g = function (e, t, i, n) {
  return -4 * i * Math.pow(e / n - (0.5 + t), 2) + 1
}
export default {
  vG: r,
  FG: o,
  hl: a,
  to: l,
  Q9: c,
  w2: h,
  qb: d,
  Fs: u,
  e3: p,
  tf: m,
  aB: g
}
